--- dcmtk-3.6.0/ofstd/libsrc/CMakeLists.txt.orig	2009-12-21 16:06:18.000000000 +0100
+++ dcmtk-3.6.0/ofstd/libsrc/CMakeLists.txt	2012-02-23 17:17:52.666637685 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(ofstd ofcmdln ofconapp ofcond ofconfig ofconsol ofcrc32 ofdate ofdatime offname oflist ofstd ofstring ofthread oftime)
 
+TARGET_LINK_LIBRARIES(ofstd pthread)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} ofstd)
--- dcmtk-3.6.0/oflog/libsrc/CMakeLists.txt.orig	2010-12-08 14:19:02.000000000 +0100
+++ dcmtk-3.6.0/oflog/libsrc/CMakeLists.txt	2012-02-23 17:17:26.399970139 +0100
@@ -8,5 +8,7 @@
 
 ADD_LIBRARY(oflog oflog apndimpl appender config consap factory fileap filter globinit hierarchy hierlock layout logger logimpl logevent loglevel loglog lloguser ndc ntelogap nullap objreg patlay pointer property rootlog sleep socketap sockbuff socket strhelp syncprims syslogap threads timehelp ${OFLOG_PLATFORM_LIBRARIES})
 
+TARGET_LINK_LIBRARIES(oflog ofstd pthread)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} oflog)
--- dcmtk-3.6.0/dcmdata/libsrc/CMakeLists.txt.orig	2010-08-27 17:26:01.000000000 +0200
+++ dcmtk-3.6.0/dcmdata/libsrc/CMakeLists.txt	2012-02-23 21:00:35.580418457 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(dcmdata cmdlnarg dcbytstr dcchrstr dccodec dcdatset dcddirif dcdicdir dcdicent dcdict dcdictzz dcdirrec dcelem dcerror dcfilefo dchashdi dcistrma dcistrmb dcistrmf dcistrmz dcitem dclist dcmetinf dcobject dcostrma dcostrmb dcostrmf dcostrmz dcpcache dcpixel dcpixseq dcpxitem dcrleccd dcrlecce dcrlecp dcrledrg dcrleerg dcrlerp dcsequen dcstack dcswap dctag dctagkey dctypes dcuid dcwcache dcvm dcvr dcvrae dcvras dcvrat dcvrcs dcvrda dcvrds dcvrdt dcvrfd dcvrfl dcvris dcvrlo dcvrlt dcvrobow dcvrof dcvrpn dcvrpobw dcvrsh dcvrsl dcvrss dcvrst dcvrtm dcvrui dcvrul dcvrulup dcvrus dcvrut dcxfer dcpath vrscan vrscanl)
 
+TARGET_LINK_LIBRARIES(dcmdata oflog ofstd z)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmdata)
--- dcmtk-3.6.0/dcmdata/libi2d/CMakeLists.txt.orig	2009-07-16 16:25:38.000000000 +0200
+++ dcmtk-3.6.0/dcmdata/libi2d/CMakeLists.txt	2012-02-24 17:16:09.796193895 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(libi2d i2d i2dplvlp i2djpgs i2dbmps i2dplsc i2dplnsc)
 
+TARGET_LINK_LIBRARIES(libi2d dcmdata)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} libi2d)
--- dcmtk-3.6.0/dcmsign/libsrc/CMakeLists.txt.orig	2005-09-15 10:21:03.000000000 +0200
+++ dcmtk-3.6.0/dcmsign/libsrc/CMakeLists.txt	2012-02-23 19:33:12.730242908 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(dcmdsig dcsignat siautopr sibrsapr sicert sicertvf sicreapr sidsa simaccon simd5 sinullpr siprivat siripemd sirsa sisha1 sisprof sitypes)
 
+TARGET_LINK_LIBRARIES(dcmdsig dcmdata ofstd crypto)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmdsig)
--- dcmtk-3.6.0/dcmimgle/libsrc/CMakeLists.txt.orig	2005-09-15 10:10:03.000000000 +0200
+++ dcmtk-3.6.0/dcmimgle/libsrc/CMakeLists.txt	2012-02-23 21:04:48.253760251 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(dcmimgle dcmimage dibaslut diciefn dicielut didislut didispfn didocu digsdfn digsdlut diimage diinpx diluptab dimo1img dimo2img dimoimg dimoimg3 dimoimg4 dimoimg5 dimomod dimoopx dimopx diovdat diovlay diovlimg diovpln diutils)
 
+TARGET_LINK_LIBRARIES(dcmimgle dcmdata oflog ofstd)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmimgle)
--- dcmtk-3.6.0/dcmimage/libsrc/CMakeLists.txt.orig	2009-11-25 15:40:25.000000000 +0100
+++ dcmtk-3.6.0/dcmimage/libsrc/CMakeLists.txt	2012-02-23 21:05:54.503762469 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(dcmimage diargimg dicmyimg dicoimg dicoopx dicopx dihsvimg dilogger dipalimg dipipng dipitiff diqtctab diqtfs diqthash diqthitl diqtpbox diquant diregist dirgbimg diybrimg diyf2img diyp2img)
 
+TARGET_LINK_LIBRARIES(dcmimage dcmimgle oflog ofstd tiff png)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmimage)
--- dcmtk-3.6.0/dcmnet/libsrc/CMakeLists.txt.orig	2009-12-16 18:02:57.000000000 +0100
+++ dcmtk-3.6.0/dcmnet/libsrc/CMakeLists.txt	2012-02-23 21:08:10.720433697 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(dcmnet assoc cond dcasccff dcasccfg dccfenmp dccfpcmp dccfprmp dccfrsmp dccftsmp dccfuidh dcmlayer dcmtrans dcompat dimcancl dimcmd dimdump dimecho dimfind dimget dimmove dimse dimstore diutil dul dulconst dulextra dulfsm dulparse dulpres extneg lst dfindscu dcuserid scu scp)
 
+TARGET_LINK_LIBRARIES(dcmnet dcmdata oflog ofstd)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmnet)
--- dcmtk-3.6.0/dcmjpeg/libsrc/CMakeLists.txt.orig	2009-10-07 14:44:33.000000000 +0200
+++ dcmtk-3.6.0/dcmjpeg/libsrc/CMakeLists.txt	2012-02-24 15:13:17.155947032 +0100
@@ -4,5 +4,7 @@
 # create library from source files
 ADD_LIBRARY(dcmjpeg ddpiimpl dipijpeg djcodecd djcodece djcparam djdecbas djdecext djdeclol djdecode djdecpro djdecsps djdecsv1 djdijg12 djdijg8 djdijg16 djeijg12 djeijg8 djeijg16 djencbas djencext djenclol djencode djencpro djencsps djencsv1 djrplol djrploss djutils)
 
+TARGET_LINK_LIBRARIES(dcmjpeg dcmimgle ijg8 ijg12 ijg16)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmjpeg)
--- dcmtk-3.6.0/dcmjpls/libsrc/CMakeLists.txt.orig	2012-02-23 21:11:28.480440318 +0100
+++ dcmtk-3.6.0/dcmjpls/libsrc/CMakeLists.txt	2012-02-24 15:14:53.392616922 +0100
@@ -4,5 +4,7 @@
 # create library from source files
 ADD_LIBRARY(dcmjpls djcparam djdecode djencode djrparam djcodecd djutils djcodece)
 
+TARGET_LINK_LIBRARIES(dcmjpls dcmimgle CharLS)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmjpls)
--- dcmtk-3.6.0/dcmqrdb/libsrc/CMakeLists.txt.orig	2005-12-16 13:44:35.000000000 +0100
+++ dcmtk-3.6.0/dcmqrdb/libsrc/CMakeLists.txt	2012-02-24 17:48:45.209592704 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(dcmqrdb dcmqrcbf dcmqrcbg dcmqrcbm dcmqrcbs dcmqrcnf dcmqrdbi dcmqrdbs dcmqropt dcmqrptb dcmqrsrv dcmqrtis)
 
+TARGET_LINK_LIBRARIES(dcmqrdb dcmnet)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmqrdb)
--- dcmtk-3.6.0/dcmsr/libsrc/CMakeLists.txt.orig	2010-11-05 12:06:57.000000000 +0100
+++ dcmtk-3.6.0/dcmsr/libsrc/CMakeLists.txt	2012-02-24 17:13:02.179520948 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(dcmsr dsrcitem dsrcodtn dsrcodvl dsrcomtn dsrcomvl dsrcontn dsrcsidl dsrdattn dsrdoc dsrdoctn dsrdoctr dsrdtitn dsrimgfr dsrimgtn dsrimgvl dsrnumtn dsrnumvl dsrpnmtn dsrreftn dsrscogr dsrsc3gr dsrscotn dsrsc3tn dsrscovl dsrsc3vl dsrsoprf dsrstrvl dsrtcodt dsrtcosp dsrtcotn dsrtcoto dsrtcovl dsrtextn dsrtimtn dsrtncsr dsrtree dsrtypes dsruidtn dsrwavch dsrwavtn dsrwavvl dsrxmlc dsrxmld dsriodcc dsrbascc dsrenhcc dsrcomcc dsrkeycc dsrmamcc dsrchecc dsrcolcc dsrprocc dsrxrdcc dsrspecc dsrmaccc dsrimpcc)
 
+TARGET_LINK_LIBRARIES(dcmsr dcmdata xml2)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmsr)
--- dcmtk-3.6.0/dcmtls/libsrc/CMakeLists.txt.orig	2010-04-29 18:18:39.000000000 +0200
+++ dcmtk-3.6.0/dcmtls/libsrc/CMakeLists.txt	2012-02-24 15:17:42.772622593 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(dcmtls tlslayer tlstrans tlsscu)
 
+TARGET_LINK_LIBRARIES(dcmtls dcmnet oflog ofstd ssl crypto)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmtls)
--- dcmtk-3.6.0/dcmwlm/libsrc/CMakeLists.txt.orig	2005-09-15 10:25:33.000000000 +0200
+++ dcmtk-3.6.0/dcmwlm/libsrc/CMakeLists.txt	2012-02-24 17:44:46.996251395 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(dcmwlm wlds wldsfs wlfsim wlmactmg)
 
+TARGET_LINK_LIBRARIES(dcmwlm dcmnet)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmwlm)
--- dcmtk-3.6.0/dcmpstat/libsrc/CMakeLists.txt.orig	2005-09-15 10:17:54.000000000 +0200
+++ dcmtk-3.6.0/dcmpstat/libsrc/CMakeLists.txt	2012-02-24 18:50:07.069715986 +0100
@@ -1,5 +1,7 @@
 # create library from source files
 ADD_LIBRARY(dcmpstat dcmpstat dviface dvpsab dvpsabl dvpsal dvpsall dvpscf dvpscu dvpscul dvpsda dvpsdal dvpsfs dvpsga dvpsgal dvpsgl dvpsgll dvpsgr dvpsgrl dvpshlp dvpsib dvpsibl dvpsmsg dvpsov dvpsovl dvpspl dvpspl2 dvpspll dvpspr dvpsprt dvpsri dvpsril dvpsrs dvpsrsl dvpssp dvpsspl dvpssv dvpssvl dvpstat dvpstx dvpstxl dvpsvl dvpsvll dvpsvw dvpsvwl dvsighdl)
 
+TARGET_LINK_LIBRARIES(dcmpstat dcmdsig dcmimgle dcmqrdb dcmsr dcmtls)
+
 # declare installation files
 INSTALL_TARGETS(${INSTALL_LIBDIR} dcmpstat)
